﻿namespace FenopyApi
{
    public class SearchResult
    {
        public string Name { get; set; }
        public long Size { get; set; }
        public string Page { get; set; }
        public string Torrent { get; set; }
        public string Magnet { get; set; }
        public string Hash { get; set; }
        public string Category { get; set; }
        public int Seeder { get; set; }
        public int Leecher { get; set; }
        public int Verified { get; set; }

        /// <summary>
        /// <see cref="SearchResult.Verified"/> is an integer - this field is a shorthand to parsing that into a Boolean.
        /// </summary>
        public bool IsVerified
        {
            get { return Verified >= 1; }
            set { Verified = value ? 1 : 0; }
        }
    }
}
